package cn.foolishbird.crow.attribute.permission;

import cn.foolishbird.crow.core.CrowEnum;
import cn.foolishbird.crow.enumeration.annotation.DefDictionary;
import cn.foolishbird.crow.enumeration.annotation.Dictionary;

/**
 * @author foolish bird
 */
@Dictionary(value = "AttributeDataTypeEnum", name = "属性权限类型")
public enum AttributeDataTypeEnum implements CrowEnum {

    @DefDictionary
    KEY_VALUE(1, "键值对"),
    KEY_ARRAY(2, "集合");

    /**
     * 类型
     */
    private final int type;

    /**
     * 说明
     */
    private final String desc;

    AttributeDataTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    @Override
    public Integer value() {
        return this.type;
    }

    @Override
    public String content() {
        return this.desc;
    }
}
